package com.example.usb.greendao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.example.usb.dao.entity.FaceInfoBean;
import com.example.usb.dao.entity.PhotoPicBean;

import com.example.usb.greendao.FaceInfoBeanDao;
import com.example.usb.greendao.PhotoPicBeanDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig faceInfoBeanDaoConfig;
    private final DaoConfig photoPicBeanDaoConfig;

    private final FaceInfoBeanDao faceInfoBeanDao;
    private final PhotoPicBeanDao photoPicBeanDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        faceInfoBeanDaoConfig = daoConfigMap.get(FaceInfoBeanDao.class).clone();
        faceInfoBeanDaoConfig.initIdentityScope(type);

        photoPicBeanDaoConfig = daoConfigMap.get(PhotoPicBeanDao.class).clone();
        photoPicBeanDaoConfig.initIdentityScope(type);

        faceInfoBeanDao = new FaceInfoBeanDao(faceInfoBeanDaoConfig, this);
        photoPicBeanDao = new PhotoPicBeanDao(photoPicBeanDaoConfig, this);

        registerDao(FaceInfoBean.class, faceInfoBeanDao);
        registerDao(PhotoPicBean.class, photoPicBeanDao);
    }
    
    public void clear() {
        faceInfoBeanDaoConfig.clearIdentityScope();
        photoPicBeanDaoConfig.clearIdentityScope();
    }

    public FaceInfoBeanDao getFaceInfoBeanDao() {
        return faceInfoBeanDao;
    }

    public PhotoPicBeanDao getPhotoPicBeanDao() {
        return photoPicBeanDao;
    }

}
